package org.apache.axis2;

import org.apache.axis2.CatalogWebServiceStub.GetCatalog;



/**
 * 
 * Mobile application main
 *
 */
public class CatalogMobileApp {

	public static void main(String[] args){
		try {
			CatalogWebServiceStub catalog = new CatalogWebServiceStub();
			//retrieve the catalog by calling the library webservice
			String[] result = catalog.getCatalog(new GetCatalog()).get_return();
			System.out.println("Here is the online catalog:");
			int i = 1;
			for (String book : result) {
				System.out.println(i + ") " + book);
				i++;
			}
		} catch (Exception e) {
			System.out.println("Web Service is unavailable");
			e.printStackTrace();
		} 
	}
	
}
